// 图片组件
import errImg from '@/assets/images/errImg.jpg';

const ProImage = ({
    props: {
        src: String,
        alt: {
            defual: 'alt',
            type: String
        },
        radius: {
            defual: 0,
            type: Number,
        }
    },
    setup(props){
        return () => (
            <van-image
              width="100%"
              height="100%"  
              lazy-load
              radius={props.radius}
              fit="cover"
              src={props.src} 
              alt={props.alt}
              v-slots={{
                  'error': () => <img src={errImg} />
              }}
            />
        )
    }
})

export default ProImage;